table.insert(itemActions,
	function(item, action)
		-- RARE boots rev 1.0 by Kel. Last update 7.18.08
		-- see: dir .. "readme.txt" for information regarding these variables
		local priority = 6
		local identify = true
		local dump = true

		if not (item.quality == ItemQuality.Rare and item.baseItem.baseType.Type == ItemKind.Boots) then 
			return false
		elseif action == aPICK and (not item.flags.Identified or isGoodRareBoots(item)) then
			return priority
		elseif action == aIDENT then
			return identify
		elseif action == aSELL and item.flags.Identified and not isGoodRareBoots(item) then
			return true
		elseif action == aDUMP and item.flags.Identified and not isGoodRareBoots(item) then
			return dump
		end

		return false
	end
)

function isGoodRareBoots(item)
	local fhr, frw, mp = false, false, false
	local gf, mf, def, dblvl, repair, hfd = false, false, false, false, false, false
	local ures, dres, tres, allres = false, false, false, false
	local goodmod = false

	ures = hasRes(item, 30, 1) -- 35-40% 1 res
	dres = hasRes(item, 20, 2) -- 20-40% 2 res
	tres = hasRes(item, 15, 3)  -- 15-40% 3 res
	allres = hasRes(item, 8, 4)   -- 8-40% 4 res (very rare)

	for i = 0, item.mods:size() - 1 do
		if item.mods[i].Stat.Type == StatType.FasterHitRecovery then
			fhr = true
		elseif (item.mods[i].Stat.Type == StatType.FasterMoveVelocity and
				item.mods[i].Value >=20) then --20-30% FRW (Haste/Speed)
			frw = true
		elseif (item.mods[i].Stat.Type == StatType.MaxMana and
				item.mods[i].Value >=31) then -- 31-40 Mana (Dragons)
			mp = true
		elseif (item.mods[i].Stat.Type == StatType.GoldFind and
				item.mods[i].Value >=70) then -- 50-80% GoldFind (Wealth)
			gf = true
		elseif (item.mods[i].Stat.Type == StatType.MagicFind and
				item.mods[i].Value >=25) then -- 20-25% Magic Find (Fortune)
			mf = true
		elseif (item.mods[i].Stat.Type == StatType.DefensePercent and
				item.mods[i].Value >=81) then -- 81-200% Enhanced Defense (Holy/Godly)
			def = true
		elseif (item.mods[i].Stat.Type == StatType.ArmorPerLevel) then -- +4 def/level (Faithful)
			dblvl = true
		elseif  (item.mods[i].Stat.Type == StatType.ReplenishDurability and
            	item.flags.Ethereal) then  --  Eth + Auto-Repair Mod.(Self-Repair/Restoration)
			repair = true
		elseif (item.mods[i].Stat.Type == StatType.HalfFreezeDuration) then
			hfd = true  -- Half Freeze Duration
		end
	end

	return (
			(frw and def and (fhr or mp or dblvl or mf or ures or dres or repair)) or --Frw+Def+Other mod
			(frw and dres and (fhr or mp or dblvl or mf or ures or repair)) or --Frw+DualResists+Other mod
			(frw and (mp or dblvl or mf or ures or repair)) or --Frw+DualResists+Other mod
			(def and (dblvl or dres or fhr or ures or mf or repair)) or
   			tres or	--tri resists
   			allres -- all resists
			)
end

-- removed affixes: +6-9 dex because it's not worth it
-- added but un-searched for affix: goldfind 50-80%